package com.baidu.yyb.MMKV;


import com.baidu.yyb.constant.NoteTag;
import com.tencent.mmkv.MMKV;

/**
 * 初始化以后的mmkv调用
 * @author LiuTong
 */
public class NoteSp {
    private static MMKV mmkv = MmKvUtils.getInstance().getMMkvWith(NoteTag.SP_NAME);

    public static void putString(String key,String value){
        mmkv.putString(key, value);
    }

    public static String getString(String key){
        return mmkv.getString(key, "");
    }

    public static void putBoolean(String key,boolean value){
        mmkv.putBoolean(key,value);
    }

    public static boolean getBoolean(String key){
        return mmkv.getBoolean(key, false);
    }
    public static void setInt(String key,int value){
        mmkv.putInt(key, value);
    }
    public static int getInt(String key){
        return mmkv.getInt(key,-1);
    }




}
